<%@ Page Trace="false" language="c#" Inherits="Dimok.Aspx.Manager.Application.Application" EnableViewState="false" Buffer="false" CodeFile="Application.aspx.cs" %>
<%@ Register TagPrefix="Car" TagName="Info" Src="/Manager/Lib/Controls/CarInfo.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
<title>Application</title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<?XML:NAMESPACE PREFIX="DIMOK"/>
<?IMPORT namespace="DIMOK" implementation="/include/HTC/ListBox/ListBox_VL.htc" >
<?IMPORT namespace="DIMOK" implementation="/include/HTC/SendToMenu.htc" >
<LINK rel="stylesheet" type="text/css" href="Application.css">
<LINK rel="stylesheet" type="text/css" href="/CSS/Outlook.css">
<STYLE>
.BigFieldSet {color:navy;font-weight:bold}
INPUT {font:1.0em}
</STYLE>
<SCRIPT language="javascript" src="/include/common.js"></SCRIPT>
<SCRIPT language="javascript" src="/include/Elements.js"></SCRIPT>
<SCRIPT language="javascript" src="/include/SOAP.js"></SCRIPT>
<SCRIPT language="javascript" src="/include/Events.js"></SCRIPT>
<SCRIPT language="javascript" src="/include/RDS.js"></SCRIPT>
<SCRIPT language="javascript" src="/include/XML.js"></SCRIPT>
<SCRIPT language="javascript" src="../Common/Common.js"></SCRIPT>
<SCRIPT language="javascript" src="../Common/Events.js"></SCRIPT>
<SCRIPT language="javascript" src="ApplInfo.js"></SCRIPT>
</HEAD>
<body style="OVERFLOW-Y: auto; FONT: menu; BACKGROUND-COLOR: inactiveborder" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" onload="page_Load()">
<DIV align="center" style="font:1.4em;margin-top:5px;margin-bottom:5px">
	<B>APPLICANT'S CREDIT STATEMENT</B>
</DIV>
<TABLE>
	<TR>
		<TD nowrap onclick="showDealerList(selDealers)" class="cb"><div nowrap><B>Dealer Name</B></div></TD>
		<TD><SELECT onchange="selectSalesPerson(this)" datasrc="#xmlApplInfo" datafld="DealerID" id="selDealers" runat="server"></SELECT></TD>
		<TD>Sales Person</TD>
		<TD><SELECT id="selSalesPersons" wsMethod="XmlLoanInfo" datasrc="#xmlApplInfo" datafld="DealerSalesPersonID" runat="server" NAME="selSalesPersons"></SELECT></TD>
		<TD>Phone</TD>
		<TD><INPUT datasrc="#xmlApplInfo" datafld="DealerPhone" tabindex="-1" style="color:black" size="13"></TD>
		<TD>Fax</TD>
		<TD><INPUT datasrc="#xmlApplInfo" datafld="DealerFax" tabindex="-1" style="color:black" size="13"></TD>
	</TR>
</TABLE>
<DIV align="center">
<TABLE width="100%">
<TR valign="top">
	<TD width="50%"><!-- PERSONAL INFO -->
	<FIELDSET style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid">
		<LEGEND class="BigFieldSet">Applicant's Info</LEGEND>
		<TABLE width="100%" cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader" width="0%">SSN#</TD>
				<TD class="spnHeader" width="40%">First Name</TD>
				<TD class="spnHeader" width="60%">Last Name</TD>
			</TR>
			<TR>
				<TD><INPUT datasrc="#xmlApplInfo" datafld="SSN" onchange="return updateField(this)" maxlength="9" size="9" style=""></TD>
				<TD><INPUT datasrc="#xmlApplInfo" datafld="FirstName" onchange="return updateField(this)" style="width:100%"></TD>
				<TD><INPUT datasrc="#xmlApplInfo" datafld="LastName" onchange="return updateField(this)" style="width:100%"></TD>
			</TR>
		</TABLE>
		<HR style="DISPLAY: none">
		<TABLE width="100%" cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader" width="10%"></TD>
				<TD class="spnHeader" width="40%">Date Of Birth</TD>
				<TD class="spnHeader">Home Phone</TD>
			</TR>
			<TR>
				<TD><BUTTON onclick="pullCredit(true)">Pull credit</BUTTON></TD>
				<TD class="spnHeader">
					<INPUT datafld="DOBMonth" datasrc="#xmlApplInfo"  onchange="return updateField(this)" size="2" preset="month" tabIndex="-1">
					<INPUT datafld="DOBDay" datasrc="#xmlApplInfo" preset="day" onchange="return updateField(this)" size="2" tabIndex="-1">
					<INPUT datafld="DOBYear" datasrc="#xmlApplInfo" preset="yob" onchange="return updateField(this)" size="4" tabIndex="-1">
				</TD>
				<TD>
				<INPUT preset="phone" onchange="return updateField(this)" dataSrc="#xmlApplInfo" dataFld="PhoneHome" size="15" tabIndex="-1">
				</TD>
			</TR>
		</TABLE>
                          <!-- ******** Address ********* -->
		<TABLE><TR><TH width="50%"><HR><TH class="BigFieldSet">Address<TH width="50%"><HR></TABLE>
		<TABLE width="100%" cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader" colspan="4">Current Street Addres</TD>
			</TR>
			<TR>
				<TD colspan="4"><INPUT  onchange="return updateField(this)" datasrc="#xmlAddrInfo_0" dataFld="Street" style="width:100%" tabIndex="-1"></TD>
			</TR>
			<TR>
				<TD class="spnHeader" width="1%">Zip</TD>
				<TD class="spnHeader" width="100%">City</TD>
				<TD class="spnHeader" width="1%">State</TD>
				<TD class="spnHeader" width="1%">How Long</TD>
			</TR>
			<TR>
				<TD>
					<INPUT onchange="updateZip(this)" datasrc="#xmlAddrInfo_0" dataFld="Zip" size="5">
				</TD>
				<TD>
					<DIMOK:SELECT id="selCityName" dataSource="#xmlAddrInfo_0" dataField="CityName" onupdate="return updateField(this)" onerror="return updateField(this,undefined,this.text)" style="width:100%"  tabIndex="-1">
						<ASP:LITERAL Runat="server" ID="ltrCities"></ASP:LITERAL>
					</DIMOK:SELECT>
				</TD>
				<TD>
					<DIMOK:SELECT id="selState" dataSource="#xmlAddrInfo_0" dataField="StateCode" size="4" doFilter="1" onupdate="return updateField(this)"  tabIndex="-1">
						<ASP:LITERAL Runat="server" ID="ltrStates"></ASP:LITERAL>
					</DIMOK:SELECT>
				</TD>
				<TD class="spnHeader">
					<INPUT datasrc="#xmlAddrInfo_0" datafld="Years" onchange="return updateField(this)" size="2">Y
					<INPUT datasrc="#xmlAddrInfo_0" datafld="Months" onchange="return updateField(this)" size="2" preset="month">M
				</TD>
			</TR>
		</TABLE>
		<TABLE width="100%" cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader" width="20%">Home</TD>
				<TD class="spnHeader" width="10%">Pymt</TD>
				<TD class="spnHeader" width="70%">Leased/Financed By</TD>
			</TR>
			<TR>
				<TD>
					<DIMOK:SELECT dataSource="#xmlApplInfo" dataField="HouseHoldTypeID"  onupdate="return updateField(this)" size="6" style="font-size:1em">
						<ASP:LITERAL Runat="server" ID="ltrResidence"></ASP:LITERAL>
					</DIMOK:SELECT>
				</TD>
				<TD><INPUT datasrc="#xmlApplInfo" datafld="HousePayment" size="4" onchange="return updateField(this)"></TD>
				<TD><INPUT datasrc="#xmlApplInfo" datafld="LandLord" onchange="return updateField(this)" style="width:100%"></TD>
			</TR>
		</TABLE>
                          <!-- ******** Previous Address ********* -->
		<TABLE><TR><TH width="50%"><HR><TH class="BigFieldSet" nowrap>Previous Address<TH width="50%"><HR></TABLE>
		<TABLE width="100%" cellpadding="0" cellspacing="0"><!-- Previous Address -->
			<TR>
				<TD class="spnHeader" colspan="4">Previous Street Address</TD>
			</TR>
			<TR>
				<TD colspan="4">
					<INPUT  onchange="return updateField(this)" datasrc="#xmlAddrInfo_1" dataFld="Street" style="width:100%">
				</TD>
			</TR>
			<TR>
				<TD class="spnHeader" width="1%">Zip</TD>
				<TD class="spnHeader" width="100%">City</TD>
				<TD class="spnHeader" width="1%">State</TD>
				<TD class="spnHeader" width="1%">How Long</TD>
			</TR>
			<TR>
				<TD><INPUT onchange="updateZip(this,1)" datasrc="#xmlAddrInfo_1" dataFld="Zip" size="5"></TD>
				<TD>
					<DIMOK:SELECT id="selCityName1" dataSource="#xmlAddrInfo_1" dataField="CityName" onupdate="return updateField(this)" onerror="return updateField(this,undefined,this.text)" style="width:100%">
						<ASP:LITERAL Runat="server" ID="ltrCities1"></ASP:LITERAL>
					</DIMOK:SELECT>
				</TD>
				<TD>
					<DIMOK:SELECT id="selState1" dataSource="#xmlAddrInfo_1" dataField="StateCode" size="4" doFilter="1" onupdate="return updateField(this)">
						<ASP:LITERAL Runat="server" ID="ltrStates1"></ASP:LITERAL>
					</DIMOK:SELECT>
				</TD>
				<TD class="spnHeader">
					<INPUT datasrc="#xmlAddrInfo_1" datafld="Years" onchange="return updateField(this)" size="2">Y
					<INPUT datasrc="#xmlAddrInfo_1" datafld="Months" onchange="return updateField(this)" size="2" class="mask" preset="month">M
				</TD>
			</TR>
		</TABLE>
                          <!-- ******** Employment ********* -->
		<TABLE><TR><TH width="50%"><HR><TH class="BigFieldSet">Employment<TH width="50%"><HR></TABLE>
		<TABLE width="100%" cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader">Current Employer</TD>
				<TD class="spnHeader">Occupation</TD>
			</TR>
			<TR>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_0" dataFld="Name" style="width:100%"></TD>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_0" dataFld="Position" style="width:100%"></TD>
			</TR>
		</TABLE>
		<TABLE cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader" width="100%">Business Phone</TD>
				<TD class="spnHeader" width="100%">How Long</TD>
				<TD class="spnHeader" width="0%">How Much($/mos)</TD>
			</TR>
			<TR>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_0" dataFld="Phone" preset="phone" size="15"></TD>
				<TD class="spnHeader">
					<INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_0" dataFld="Years" size="3">Y
					<INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_0" dataFld="Months" size="3">M
				</TD>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_0" dataFld="Salary" preset="currency" nodollar="1" style="width:100%"></TD>
			</TR>
			<TR>
				<TD class="spnHeader" colspan="2">Other Income</TD>
				<TD class="spnHeader" width="0%">How Much</TD>
			</TR>
			<TR>
				<TD colspan="2">
					<DIMOK:SELECT dataSource="#xmlApplInfo" dataField="NonEmploymentIncomeDesc" onupdate="return updateField(this)" onerror="return updateField(this,undefined,this.text)" style="width:100%">
						<ASP:LITERAL Runat="server" ID="ltrUsableIncome"></ASP:LITERAL>
					</DIMOK:SELECT>
				</TD>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlApplInfo" dataFld="NonEmploymentIncome" style="width:100%" preset="currency" noDollar></TD>
			</TR>
		</TABLE>
                          <!-- ******** Previous Employment ********* -->
		<TABLE><TR><TH width="50%"><HR><TH class="BigFieldSet" nowrap>Previous Employment<TH width="50%"><HR></TABLE>
		<TABLE width="100%" cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader">Previous Employer</TD>
				<TD class="spnHeader">Phone</TD>
				<TD class="spnHeader">How Long</TD>
			</TR>
			<TR>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_1" dataFld="Name" style="width:100%"></TD>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_1" dataFld="Phone" preset="phone" size="13"></TD>
				<TD class="spnHeader">
					<INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_1" dataFld="Years" size="2">Y
					<INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfo_1" dataFld="Months" size="2">M
				</TD>
			</TR>
		</TABLE>
	</FIELDSET>
	</TD>
	                     <!-- ******* Co-Applicant ******* -->
	<TD width="50%">
	<FIELDSET style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid">
		<LEGEND class="BigFieldSet">Co-Applicant's Info
			<INPUT type="button" id="btnRemCoAppl" onclick="remCoAppl()" value="Delete" tabindex="-1">
		</LEGEND>
		<TABLE width="100%" cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader" width="0%">SSN#</TD>
				<TD class="spnHeader" width="40%">First Name</TD>
				<TD class="spnHeader" width="60%">Last Name</TD>
			</TR>
			<TR>
				<TD><INPUT datasrc="#xmlApplInfoCo" datafld="SSN" onchange="return updateField(this)||checkCoX(this)" size="10" maxlength="9"></TD>
				<TD><INPUT datasrc="#xmlApplInfoCo" datafld="FirstName" onchange="return updateField(this)||checkCoX(this)" style="width:100%"></TD>
				<TD><INPUT datasrc="#xmlApplInfoCo" datafld="LastName" onchange="return updateField(this)||checkCoX(this)" style="width:100%"></TD>
			</TR>
		</TABLE>
                             <!-- Co - Employment -->
		<TABLE><TR><TH width="50%"><HR><TH class="BigFieldSet">Employment<TH width="50%"><HR></TABLE>
		<TABLE width="100%" cellpadding="0" cellspacing="0" id="tblMain">
			<TR>
				<TD class="spnHeader">Current Employer</TD>
				<TD class="spnHeader">Occupation</TD>
			</TR>
			<TR>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_0" dataFld="Name" style="width:100%"></TD>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_0" dataFld="Position" style="width:100%"></TD>
			</TR>
		</TABLE>
		<TABLE cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader" width="100%">Business Phone</TD>
				<TD class="spnHeader" width="100%">How Long</TD>
				<TD class="spnHeader" width="0%">How Much($/mos)</TD>
			</TR>
			<TR>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_0" dataFld="Phone" preset="phone" size="13"></TD>
				<TD class="spnHeader">
					<INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_0" dataFld="Years" size="3">Y
					<INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_0" dataFld="Months" size="3">M
				</TD>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_0" dataFld="Salary" preset="currency" nodollar style="width:100%"></TD>
			</TR>
			<TR>
				<TD class="spnHeader" colspan="2">Other Income</TD>
				<TD class="spnHeader" width="0%">How Much</TD>
			</TR>
			<TR>
				<TD colspan="2">
					<DIMOK:SELECT dataSource="#xmlApplInfoCo" dataField="NonEmploymentIncomeDesc" onupdate="return updateField(this)" onerror="return updateField(this,undefined,this.text)" style="width:100%">
						<ASP:LITERAL Runat="server" ID="ltrUsableIncomeCo"></ASP:LITERAL>
					</DIMOK:SELECT>
				</TD>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlApplInfoCo" dataFld="NonEmploymentIncome" style="width:100%" preset="currency" nodollar></TD>
			</TR>
		</TABLE>
                             <!--Previous Employment -->
		<TABLE><TR><TH width="50%"><HR><TH class="BigFieldSet" nowrap>Previous Employment<TH width="50%"><HR></TABLE>
		<TABLE width="100%" cellpadding="0" cellspacing="0">
			<TR>
				<TD class="spnHeader">Previous Employer</TD>
				<TD class="spnHeader">Phone</TD>
				<TD class="spnHeader">How Long</TD>
			</TR>
			<TR>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_1" dataFld="Name" style="width:100%"></TD>
				<TD><INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_1" dataFld="Phone" preset="phone" size="13"></TD>
				<TD class="spnHeader">
					<INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_1" dataFld="Years" size="2">Y
					<INPUT onchange="return updateField(this)" datasrc="#xmlEmplInfoCo_1" dataFld="Months" size="2">M
				</TD>
			</TR>
		</TABLE>
	</FIELDSET>
	</TD>
</TR>
</TABLE>
</DIV>
<CAR:INFO runat="server" />
<dimok:sendmenu dir="F" onsend="sendToMenu()" style="display:block">
	<asp:literal id="ltrWorkFlow_F" runat="server"></asp:literal>
</dimok:sendmenu>
<dimok:sendmenu dir="B" onsend="sendToMenu()" style="display:block">
	<asp:literal id="ltrWorkFlow_B" runat="server"></asp:literal>
</dimok:sendmenu>

<XML id="xmlApplInfo" id="xmlTest">
	<ASP:LITERAL id="ltrApplInfo" Runat="server"></ASP:LITERAL>
</XML>
<XML id="xmlApplInfoCo">
	<ASP:LITERAL id="ltrApplInfoCo" Runat="server"></ASP:LITERAL>
</XML>
<XML id="xmlAddrInfo_0">
	<ASP:LITERAL id="ltrAddrInfo_0" Runat="server"></ASP:LITERAL>
</XML>
<XML id="xmlAddrInfo_1">
	<ASP:LITERAL id="ltrAddrInfo_1" Runat="server"></ASP:LITERAL>
</XML>
<XML id="xmlEmplInfo_0">
	<ASP:LITERAL id="ltrEmplInfo_0" Runat="server"></ASP:LITERAL>
</XML>
<XML id="xmlEmplInfo_1">
	<ASP:LITERAL id="ltrEmplInfo_1" Runat="server"></ASP:LITERAL>
</XML>
<XML id="xmlEmplInfoCo_0">
	<ASP:LITERAL id="ltrEmplInfoCo_0" Runat="server"></ASP:LITERAL>
</XML>
<XML id="xmlEmplInfoCo_1">
	<ASP:LITERAL id="ltrEmplInfoCo_1" Runat="server"></ASP:LITERAL>
</XML>
<XML id="xmlDealershipInfo">
	<ASP:LITERAL id="ltrDealershipInfo" Runat="server"></ASP:LITERAL>
</XML>
</body>
</HTML>
<SCRIPT language="javascript">
function checkCoX(txt){
	if( fieldByName(txt,"SSN")+fieldByName(txt,"LastName")+fieldByName(txt,"FirstName") == "" )
		alert("Co-applicant was removed from database.\n\nRe-pull credit to update decision!");
}
function pullCredit(ignoreAutoTD){
 //return alert("Not implemented until Credit Source is determined!");
	var co = CO("PullCredit",undefined,false);
	var ret = WS(co,ignoreAutoTD);
	if( showSOAPError(ret) )return;
	fireCreditRepulled(applID);
	location.reload(true);
}
function updateZip(txt,index){
//	updateField(txt);
	index = index || 0;
	//if( txt.value != "" && txt.value.length != 5 )return;
	var co = CO("GetCitiesByZip",undefined,false);
	var ret = WS(co,txt.value,index);
	if( showSOAPError(ret) )return;
	var xml = new ActiveXObject("Microsoft.XMLDOM");
	var rs = new ActiveXObject("adodb.recordset");
	if( !xml.loadXML(ret.value) )return alert("Error loading XML.");
	rs.open(xml);
	eval("selCityName"+(index?1:"")).rs = rs;
	if( rs.EOF )return;
	eval("selCityName"+(index?1:"")).text = rs("t").Value
	eval("selState"+(index?1:"")).text = rs("st").Value;
}
</SCRIPT>
